<?php
class SystemPermissionsRows extends Model
	{
		var $database_config = 'db_config_default';
		public $name = 'system_permissions_rows';
		public $table_name = 't_system_permissions_rows';
		public $stored_procedure_list =   'sp_system_permissions_rows_list';
		public $stored_procedure_update = 'sp_system_permissions_rows_update';
		public $stored_procedure_delete = 'sp_system_permissions_rows_delete';
		public $stored_procedure_insert = 'sp_system_permissions_rows_insert';
		public $db_structure = array
		(
			'id' => array			
			(
				'name' => 'system_permission_row_id', 
				'type'=>'bigint',
				'primary_key'=>true,
				'not_null'=>true
			),
			
			'role_id' => array			
			(
				'name' => 'role_id', 
				'type'=>'bigint',
				'not_null'=>false,
			),
			
			'user_id' => array			
			(
				'name' => 'user_id', 
				'type'=>'bigint',
				'not_null'=>false,
				'table_name'=>'t_users'
			),
			
			'system_table_id' => array			
			(
				'name' => 'system_table_id', 
				'type'=>'bigint',
				'not_null'=>false,
			),
			
			'row_id' => array			
			(
				'name' => 'row_id', 
				'type'=>'bigint',
				'not_null'=>false,
			),
			
			'role_name' => array			
			(
				'name' => 'role_name', 
				'type'=>'varchar',
				'length'=>'100',
				'not_null'=>true,
				'table_name'=>'t_roles'
			),
			
			'system_table_name' => array			
			(
				'name' => 'system_table_name', 
				'type'=>'varchar',
				'length'=>'100',
				'not_null'=>true,
				'table_name'=>'t_system_tables'
			),
			
			'view' => array			
			(
				'name' => 'permission_view', 
				'type'=>'bit',
				'not_null'=>true,
				'related'=>true
			),
			
			'edit' => array			
			(
				'name' => 'permission_edit', 
				'type'=>'bit',
				'not_null'=>true,
				'related'=>true
			),
			
			'delete' => array			
			(
				'name' => 'permission_delete', 
				'type'=>'bit',
				'not_null'=>true,
				'related'=>true
			),
			
			'child' => array			
			(
				'name' => 'permission_child', 
				'type'=>'bit',
				'not_null'=>true,
				'related'=>true
			),
			
			'access_url' => array			
			(
				'name' => 'access_url', 
				'type'=>'bit',
				'not_null'=>false,
			),	
			
			'url' => array			
			(
				'name' => 'system_delegation_url', 
				'type'=>'varchar',
				'length'=>'100',
				'not_null'=>false,
				'table_name'=>'t_system_delegations'
			),	
			
		);
	}
?>